﻿using System;

namespace InfoJetSoft.Service
{
	
	public class InfoJetException:System.Exception
	{
		public string ErrorCode
		{
			get
			{
				return this.errorCode;
			}
			
		}

		public string Description
		{
			get
			{
				return this.description;
			}
			
		}
		
		private string errorCode = "";
		private string description = "";
		
		public InfoJetException(string errorCode):base("["+errorCode+"]")
		{
			this.errorCode = errorCode;
		}
		
        //CID 0859 //2012.03.20 //?:
		public InfoJetException(string desc, string errorCode):base(errorCode == null ? desc: "["+errorCode+"]" + desc)
		{
			this.errorCode = errorCode;
			this.description = desc;
		}

        //CID 0859 //2012.03.20 //?:
        public InfoJetException(string desc, string errorCode, Exception exception)
            : base(errorCode == null ? desc : "[" + errorCode + "]" + desc, exception)
		{
			this.errorCode = errorCode;
			this.description = desc;
		}
	}
}